function y=distance_free_childcare(x)
    
% variables to be used in 'distance.m' and 'evaluate.m'
    global rho gma delta1 delta2 beta T ...
        psi_m psi_f alpha ...
        level_model level_data share_model share_data ...
        ind11 ind12 ind21 ind22 ...
        Cobb_Douglas price_reduction decomposition ...
        a_m a_f a_g a_y a_h ...
        W W_m W_f p P_c ...
        age married insample_data nkid X_theta phi_theta ...
        free_childcare no_response W0 min_Y_c outcome doutcome min_x max_x pbar_h N ...
        insample_baseline K edu_m i

    x=exp(x);

    param_min_Y_c=zeros(2,2);
    param_min_Y_c(1:2,1)=x(1:2);

    for m=1:2
        for e=1:2
            eval(['min_Y_c(ind' int2str(m) int2str(e) ')=param_min_Y_c(m,e);']);
        end
    end
    
    evaluate;

    y=(doutcome(3,2)/100)^2+(doutcome(13,2)/100)^2;
    
end